/*
 * Copyright [2022] [https://www.xiaonuo.vip]
 *
 * Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：
 *
 * 1.请不要删除和修改根目录下的LICENSE文件。
 * 2.请不要删除和修改Snowy源码头部的版权声明。
 * 3.本项目代码可免费商业使用，商业使用请保留源码和相关描述文件的项目出处，作者声明等。
 * 4.分发源码时候，请注明软件出处 https://www.xiaonuo.vip
 * 5.不可二次分发开源参与同类竞品，如有想法可联系团队xiaonuobase@qq.com商议合作。
 * 6.若您的项目无法满足以上几点，需要更多功能代码，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package vip.xiaonuo.biz.modular.cabinetinfo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.biz.modular.locationarea.entity.BizLocationArea;
import vip.xiaonuo.biz.modular.locationbuilding.entity.BizLocationBuilding;
import vip.xiaonuo.biz.modular.locationroom.entity.BizLocationRoom;
import vip.xiaonuo.biz.modular.position.entity.BizPosition;
import vip.xiaonuo.common.pojo.CommonEntity;

import java.util.Date;

/**
 * 柜子信息实体
 *
 * @author kongxm
 * @date 2022/11/12 22:02
 **/
@Getter
@Setter
@TableName("BIZ_CABINET_INFO")
public class BizCabinetInfo extends CommonEntity implements TransPojo {
    /**
     * ID
     */
    @TableId
    @ApiModelProperty(value = "ID", position = 1)
    private String id;

    /**
     * 柜子名称
     */
    @ApiModelProperty(value = "柜子名称", position = 2)
    private String cabinetName;

    /**
     * 柜子编号
     */
    @ApiModelProperty(value = "柜子编号", position = 3)
    private String cabinetCode;

    /**
     * 柜子类型
     */
    @ApiModelProperty(value = "柜子类型", position = 4)
    private String cabinetType;

    /**
     * 资产编号
     */
    @ApiModelProperty(value = "资产编号", position = 5)
    private String assetCode;

    /**
     * 权限最大天数
     */
    @ApiModelProperty(value = "权限最大天数", position = 6)
    @TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
    private Integer maxPermDays;

    /**
     * 柜子描述
     */
    @ApiModelProperty(value = "柜子描述", position = 7)
    private String cabinetComment;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注", position = 8)
    private String remark;

    /**
     * 状态 0-禁用 1-启用
     */
    @ApiModelProperty(value = "状态 0-禁用 1-启用", position = 10)
    private Integer state;

    @ApiModelProperty(value = "盘库周期", position = 16)
    private Integer makingInventoryCycle;

    @ApiModelProperty(value = "盘库周期单位 0-天 1-小时", position = 17)
    private Integer makingInventoryUnit;

    private String cabinetGroupId;

    @Trans(type = TransType.SIMPLE, target = BizLocationArea.class, fields = "name", ref = "areaName")
    private String areaId;


    @Trans(type = TransType.SIMPLE, target = BizLocationBuilding.class, fields = "name", ref = "buildingName")
    private String buildingId;

    @Trans(type = TransType.SIMPLE, target = BizLocationRoom.class, fields = "name", ref = "roomName")
    private String roomId;

    @ApiModelProperty(value = "设备硬件标识")
    private String cabinetIdentify;

    private String cabinetTypeId;

    @ApiModelProperty(value = "柜子的开锁模式：1-单人开锁 2-双人开锁 3-双人开锁，至少一个管理员")
    private Integer cabinetLockType;

    private String orgId;

    @TableField(exist = false)
    private String areaName;

    @TableField(exist = false)

    private String buildingName;

    @TableField(exist = false)
    private String roomName;

    private String cabinetNamePinyin;

    @ApiModelProperty(value = "存放试剂类型")
    private String reagentStorageType;

    @ApiModelProperty(value = "试剂最大存量")
    private String reagentStorageMax;

    @ApiModelProperty(value = "试剂当前存量")
    private String reagentStorageCurrent;

    @ApiModelProperty(value = "0-物品 1-试剂")
    private Integer cabinetInfoType;
}
